home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9071 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  656 b 

  1. From: LittleGuyRascal@msn.com (Gregory Saxton)
  2. Subject: RE: Class problem
  3. Date: 28 Feb 96 13:19:07 -0800
  4. References: <4gv6j2$klv@news-e2b.gnn.com>
  5. Message-ID: <00001a81+0000a942@msn.com>
  6. Path: news.msn.com!msn.com
  7. Newsgroups: comp.lang.c++
  8. Organization: The Microsoft Network (msn.com)
  9.  
  10. Addr is at most a type name - not an instance of your class.
  11.  
  12. In your code after the addr_data class is defined create a class 
  13. instance like any other datatpe: 
  14.  
  15.         addr_data addr;
  16.  
  17.         then try
  18.  
  19.             cin >> addr.zip;
  20.                   cin >> addr.phone;
  21.  
  22.         also remove the word addr from the class declaration - that is C 
  23. structure notation and not buying you anything.
  24.  
  25.